package org.example.ch06;

import org.example.ch06.entity.Phone;
import org.example.ch06.entity.Subject;
import org.example.ch06.entity.User;
import org.example.ch06.service.UserService;

/**
 * ClassName: Main
 * Description:
 *
 * @Author zjl
 * @Create 2025/04/24 11:26
 * @Version 1.0
 */
public class Main {

    public static void main(String[] args) {
        UserService service = new UserService();
        User user = service.getUser(1);
        System.out.println(user.getName());
        System.out.println(user.getCard().getCnum());

        for (Phone phone : user.getPhones()) {
            System.out.println(phone.getPhone());
        }

        for (Subject subject : user.getSubjects()) {
            System.out.println(subject.getName());
        }
    }
}
